package com.authine.cloudpivot.ext.enums.demandpool;

/**
 * @ClassName DemandGoodsStatusEnum
 * @Description: 需求商品状态
 * @Author fj
 * @Date 2021/4/9
 * @Version V1.0
 **/
public enum DemandGoodsStatusEnum {
    /**
     * 需求商品状态
     */
    DEMAND_GOODS_0_ALL("0", "全部"),

    DEMAND_GOODS_1_NEW("1", "未执行"),

    DEMAND_GOODS_2_INQUIRY("2", "已转询价"),

    DEMAND_GOODS_3_ORDER("3", "已转订单"),

    DEMAND_GOODS_4_UNDISTRIBUTED("4", "新建");

    private String code;
    private String des;

    private DemandGoodsStatusEnum(String code, String des) {
        this.code = code;
        this.des = des;
    }

    public String getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }

    public static DemandGoodsStatusEnum get(Number code) {
        for (DemandGoodsStatusEnum c : DemandGoodsStatusEnum.values()) {
            if (c.code.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

}
